package com.yonyou.crm.csns.im.param;

import java.util.HashMap;
import java.util.Map;

/**
 * 获取公众号对应的url
 * @author jiaoxw
 *
 */
public class ImPubAvatarInfoFactory {
	 private static ImPubAvatarInfoFactory instance = new ImPubAvatarInfoFactory();
	 private Map<String, ImPubAvatarInfo> infoMap = new HashMap<String, ImPubAvatarInfo>();
	 private ImPubAvatarInfoFactory() {
	        super();
	        init();
	 }
	 public static ImPubAvatarInfoFactory getInstance() {
	        return instance;
	 }
	 private void init() {
		  //业务通知
		 infoMap.put(IMType.BUSIMESSAGETYPE, new ImPubAvatarInfo(IMType.BUSIMESSAGETYPE,"http://yonyoubucket.oss-cn-beijing.aliyuncs.com/newfile/IMPubAvatar/message_notification.png"));
		 //审批通知
		 infoMap.put(IMType.APPROVALTYPE, new ImPubAvatarInfo(IMType.APPROVALTYPE,"http://yonyoubucket.oss-cn-beijing.aliyuncs.com/newfile/IMPubAvatar/message_approve.png"));
		 //定时通知
		 infoMap.put(IMType.TIMERTYPE, new ImPubAvatarInfo(IMType.TIMERTYPE,"http://yonyoubucket.oss-cn-beijing.aliyuncs.com/newfile/IMPubAvatar/message_timer.png"));
		 //公告
		 infoMap.put(IMType.ANNOUNCETYPE, new ImPubAvatarInfo(IMType.ANNOUNCETYPE,"http://yonyoubucket.oss-cn-beijing.aliyuncs.com/newfile/IMPubAvatar/message_announcement.png"));
		 
	 }
	 public ImPubAvatarInfo getInfo(String bjType) {
		 ImPubAvatarInfo info = infoMap.get(bjType);
	     return info;
	 }
}
